
import {mapGetters} from "vuex";
export const playListMixn = {
  computed: {
    ...mapGetters([
      'playlist'
    ])
  },
  mounted() {
    this.handlePlayList(this.playlist);
  },
  activated() {
    this.handlePlayList(this.playlist);
  },
  watch: {
    playlist(newList) {
      this.handlePlayList(newList)
    }
  },
  methods: {
    handlePlayList() {
      throw new  Error('组件需要执行handlePlayList函数');
    }
  }
};
